package com.cmict.data.infra.controller.admin.rdb.vo;

import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;

/**
* 数据库 Base VO，提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
*/
@Data
public class RdbBaseVO {

    @ApiModelProperty(value = "库类型", required = true)
    @NotNull(message = "库类型不能为空")
    @Size(max = 15, message = "库类型长度不能超过15个字符")
    private String type;

    @ApiModelProperty(value = "数据库ip", required = true)
    @NotNull(message = "数据库ip不能为空")
    @Size(max = 100, message = "数据库ip长度不能超过100个字符")
    private String ip;

    @ApiModelProperty(value = "数据库端口", required = true)
    @NotNull(message = "数据库端口不能为空")
    @Size(max = 10, message = "数据库端口长度不能超过10个字符")
    private String port;

    @ApiModelProperty(value = "数据库账号", required = true)
    @NotNull(message = "数据库账号不能为空")
    @Size(max = 50, message = "数据库账号长度不能超过50个字符")
    private String username;

    @ApiModelProperty(value = "数据库密码", required = true)
    @NotNull(message = "数据库密码不能为空")
    private String password;

    @ApiModelProperty(value = "数据库名称", required = true)
    @NotNull(message = "数据库名称不能为空")
    @Size(max = 50, message = "数据库名称长度不能超过50个字符")
    private String databaseName;

    @ApiModelProperty(value = "别名", required = true)
    @NotNull(message = "别名不能为空")
    @Size(max = 255, message = "数据库名称长度不能超过255个字符")
    private String alias;

    @ApiModelProperty(value = "描述")
    @Size(max = 255, message = "描述长度不能超过255个字符")
    private String description;

}
